/**
 * @param { get 参数形式叫做params }
 * @param { post 参数形式叫做data }
 * 
*/

import ajax from './index';

export const addFn = (data) => {
  return ajax.post('/api/add', data)
}

export const deleteFn = (data) => {
  return ajax.delete('/api/delete', data)
}

export const batchDelete = (data) => {
  return ajax.delete('/api/batchDelete', data)
}

export const updateFn = (data) => {
  return ajax.put('/api/update', data)
}

export const pageFn = (params) => {
  console.log(params, 'params')
  return ajax.get('/api/page', { params })
}

export const searchFn = (params) => {
  return ajax.get('/api/search', { params })
}